<template>
    <div id="app-box">
        <img class="bg-img" src="static/image/bg.png">
        <div class="wrap">
            <div>
                <img class="main" src="static/image/game-paiming.png">
                <div class="rk-list">
                    <div class="rk-item" v-for="(item,index) in rankList" :key="index">
                        <span class="rk-nk">{{item.nickname}}</span>
                        <span class="rk-height">{{item.height}}</span>
                        <span class="rk-jp">{{item.prize_name}}</span>
                    </div>

                </div>
                <span @click="clickHandler" class="rk-btn">知道了</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
  data() {
    return {
      rankList: []
    };
  },
  created() {
    this.getRanking();
  },
  methods: {
    async getRanking() {
      let RKING = "http://h5.macocn.com//tilapia/api/rank";
      let { data } = await axios({
        url: RKING
      });
      this.rankList = data.data || [];
    },
    clickHandler(){
        history.back(-1);
    }
  }
};
</script>

<style>

</style>
